package com.qf.config;

import com.aliyun.oss.OSS;
import com.aliyun.oss.OSSClientBuilder;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class OSSConfig {

    @Value("${oss.endpoint}")
    private String endpoint;

    @Value("${oss.keyId}")
    private String keyId;

    @Value("${oss.keySecret}")
    private String keySecret;

    @Bean
    public OSS ossClinet() {
        return new OSSClientBuilder().build(endpoint, keyId,keySecret);
    }
}
